package com.xyzk.diagnose.view.dialog;
import com.xyzk.diagnose.R;

import android.app.Activity;
import android.content.Context;
import android.widget.EditText;


public  class InputDialog extends BaseDialog{
	private Context context;
	private EditText etContent;

	public InputDialog(Activity context) {
		super(context,R.id.et_dialog_input);
		this.context = context;
		etContent = (EditText) super.initView();
		etContent.setText("");
	}

	/**
	 * 设置内容
	 * @param data内容
	 */
	public void setEditString(String data){
		etContent.setText(data);
		etContent.setSelection(data.length());//设置光标位置
	}

	/**
	 * 获取内容
	 * @return
	 */
	public String getEditString(){
		return etContent.getText().toString();
	}

	/**
	 * 设置提示词
	 * @param hint提示词
	 */
	public void setHintText(String hint){
		etContent.setHint(hint);
	}

	/**
	 * 设置提示词
	 * @param 资源id
	 */
	public void setHintText(int resId){
		etContent.setHint(context.getString(resId));
	}

}
